// goaway.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "goaway.h"
#include "ReportInfo.h"
#include "url58com.h"
#include "Builder.h"
#include "director.h"


BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
    return TRUE;
}


Manager_58com manage58com;
bool GOAWAY_API init()
{
	return true; 
}

 void GOAWAY_API reportMsg(char* action)
{
	ReportInfo re ;
	re.initReporter();
	re.report(action);
}

 int  GOAWAY_API getRail_58com(char* from, char* to ,char* date,char* filename)
 {
	 Builder * b = new  Builder_58com();
	 Director* dir = new Director(b);
	 dir->construct(from,to,date,filename);
	 return XX_OK;
 }
